<?php
/* 用户表 */
namespace app\api\model;


use think\Db;
use think\Model;

class MessageHandlingHistory extends Model {


    protected $tableName = 'message_handling_history';
    
    const MESSAGE_STATUS_DRAFT=1;//存草稿箱
    const MESSAGE_STATUS_OK=2;//发布状态
    const MESSAGE_STATUS_DELETE=3;//删除
    
    /*
     * 添加操作历史记录message_handling_history表
     */
    public function insertOneDataToMessageHandlingHistory($data)
    {
        return Db::name($this->tableName)->insert($data);
    }
    
    /*
     * 获取某条消息编辑记录
     */
    public function getListByMsgId($msgId,$paginate){
        if(!(int)$msgId) return false;
        return  Db::name($this->tableName)->where(['m_b_id'=>$msgId])->order(['add_time'=>'desc'])->paginate($paginate);
    }
    

}